package info.ask4research.model.enums;

public enum Level {

	LEVEL_A(0), LEVEL_B(1), LEVEL_C(2);
	
	private int id;

	private Level(int id) {
		this.id = id;
	}
	
	public int getId() {
		return this.id;
	}
	
    public static Level valueOf(int value) {
        switch (value) {
            case 0: return LEVEL_A;
            case 1: return LEVEL_B;
            case 2: return LEVEL_C;
            default: return LEVEL_A;
        }
    }
    
    public String getName() {
		switch(this.id) {
		case 0:
			return "LEVEL_A";
		case 1:
			return "LEVEL_B";
		case 2:
			return "LEVEL_C";
		default:
			return "LEVEL_A";
		}
	}
    
    @Override
    public String toString() {
		switch(this.id) {
		case 0:
			return "Level A";
		case 1:
			return "Level B"; 
		case 2:
			return "Level C";
		default:
			return "Level A";
		}
    }
}
